<?php
header("content-type:text/html;charset=utf-8");
require  './configs/config.php';
require  './models/Model.class.php';
require './controllers/IndexController.class.php';
require './controllers/UserController.class.php';
require './controllers/GoodsController.class.php';

//获取用户参数   index.php?m=控制器名&a=操作名
//index.php?m=Goods&a=add
//获取控制器名

$m = (!empty($_GET['m']))?$_GET['m']:'Index';

//获取操作名
$a = (!empty($_GET['a']))?$_GET['a']:'index';

//拼接类名
$classname =$m.'Controller';

//实例化控制器
$controller = new $classname();

//var_dump($controller);

$controller->$a();